<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>GMC : <?php echo $this->permission->generateTitle($this->uri->segment(1)); ?></title>
 <link rel="stylesheet" href="<?php echo $this->config->item('staticPath'); ?>/<?php echo $this->uri->segment(1);?>/css/themes/ui.css" />
<link rel="stylesheet" href="<?php echo $this->config->item('staticPath'); ?>/<?php echo $this->uri->segment(1);?>/css/ui/ui.base.css" />

<link rel="stylesheet" type="text/css" href="<?php echo $this->config->item('staticPath'); ?>/css/admin.css" media="all" />
<link rel="stylesheet" type="text/css" href="<?php echo $this->config->item('staticPath'); ?>/css/lightbox.css" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo $this->config->item('staticPath'); ?>/css/datepicker.css" media="screen" />
<link rel="stylesheet" href="<?php echo $this->config->item('staticPath'); ?>/<?php echo $this->uri->segment(1);?>/css/jquery-ui.css" />
<link rel="stylesheet" href="<?php echo $this->config->item('staticPath'); ?>/<?php echo $this->uri->segment(1);?>/css/reset.css" />
<link rel="stylesheet" href="<?php echo $this->config->item('staticPath'); ?>/<?php echo $this->uri->segment(1);?>/css/text.css" />
<link rel="stylesheet" href="<?php echo $this->config->item('staticPath'); ?>/<?php echo $this->uri->segment(1);?>/css/960.css" />
<link rel="stylesheet" href="<?php echo $this->config->item('staticPath'); ?>/<?php echo $this->uri->segment(1);?>/css/demo.css" />

  
<link rel="stylesheet" href="<?php echo $this->config->item('staticPath'); ?>/css/switcher.css" rel="stylesheet" type="text/css" />

<script language="javascript" type="text/javascript" src="<?php echo $this->config->item('staticPath'); ?>/js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->config->item('staticPath'); ?>/js/jquery.lightbox.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->config->item('staticPath'); ?>/js/jquery-ui.min.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->config->item('staticPath'); ?>/js/default.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->config->item('staticPath'); ?>/js/admin.js"></script>

</head>
<body>
<form id="frmLanguage" name="frmLanguage" action="<?php echo $this->config->site_url(uri_string());?>" method="post">
<div class="container_head">
  <div class="grid_6">
    <h4>
    <?php echo $this->permission->generateTitle($this->uri->segment(1)); ?>
    </h4>
  </div>
  <!-- end .grid_6 -->
  <div class="grid_6">
  <span><input name="" type="text" class="search"> 
  <img src="<?php echo $this->config->item('staticPath'); ?>/<?php echo $this->uri->segment(1);?>/img/button_search.png" width="20" height="20"></span>
  <span>
   <select name="cboLanguage" class="select" onchange="document.getElementById('iLanguage').value=this.options[this.selectedIndex].value; document.getElementById('frmLanguage').submit();">
    <option value="english" <?php if (isset( $_POST['iLanguage'] )) {
    								echo $_POST['iLanguage']=='english'?'selected':''; 
    							}else{
    								echo '';
    							}		
    						?>>English</option>
    <option value="thai" <?php
    							if (isset( $_POST['iLanguage'] )) {
    								echo $_POST['iLanguage']=='thai'?'selected':''; 
    							}else{
    								echo '';
    							}	 
    						 ?> >Thai</option>
  </select>
	<input type="hidden" id="iLanguage" name="iLanguage" value="<?php echo isset($_POST['iLanguage'])?$_POST['iLanguage']:'';?>" />
  </span>
  <span class="user"><img src="<?php echo $this->config->item('staticPath'); ?>/<?php echo $this->uri->segment(1);?>/img/button_user.png" width="20" height="20"> <?php echo ($this->session->userdata('firstName')) ? ucfirst($this->session->userdata('firstName')) : $this->session->userdata('username'); ?></span>
  </div>
  <!-- end .grid_6 -->
</div>
  </form>
<div class="container_mainmenu">

   	<div class="grid_7">
		<span class="switcher">
			<a href="#" class="logo"><img src="<?php echo $this->config->item('staticPath'); ?>/<?php echo $this->uri->segment(1);?>/img/logo.png" width="170" height="80"></a>

			<ul class="dropdown">
				<li><a href="#" class="logo"><img src="<?php echo $this->config->item('staticPath'); ?>/<?php echo $this->uri->segment(1);?>/img/logo.png" width="170" height="80"></a></li>
				<?php
				$menuLogo = $this->permission->generateLogoMenu($this->uri->segment(1));
				if ($menuLogo) {
					foreach ($menuLogo as $row) {
						if (file_exists($this->config->item('base_filepath')."/".$row['module_code'])) {
							echo '<li><a href="'.$this->site->config['siteURL'].'/'.$row['module_code'].'" title="'.$row['module_name'].'"><img src="'. $this->config->item('staticPath').'/'.$row['module_code'].'/img/logo.png" width="170" height="80"></a></li>';
						}
					}
				}
				?>
			</ul>
		</span>
    </div>

  	<?php 
	  echo $this->permission->generateMenu($this->uri->segment(1));  	
  	?>

    <div class="clear"></div>
</div>